<?phpif(!defined('IN_UCHOME')) {
	exit('Access Denied');
}
if($_SGLOBAL['supe_uid']){
	showmessage('do_success', 'index.php', 0);
}
//没有登录表单
$_SGLOBAL['nologinform'] = 1;
//if(submitcheck('loginsubmit')) {
if($_REQUEST["action"]=="save") {
	$password = addslashes(trim(stripslashes($_POST['password'])));
	$username = addslashes(trim(stripslashes($_POST['username'])));
	if(empty($_POST['username'])) {
		showmessage('users_were_not_empty_please_re_login', 'do.php?ac='.$_SCONFIG['login_action'],3);	}
	if(!$passport = getpassport($username, $password)) {
		showmessage('login_failure_please_re_login', 'do.php?ac='.$_SCONFIG['login_action'].'&amp;flag=fose');
	}
	$uids=$passport['uid'];//登陆成功后的 免登录链接  UID
	$sid=$passport['passport'];//登陆成功后的 免登录链接  UID
	$setarr = array(
		'uid' => $passport['uid'],
		'username' => addslashes($passport['username']),
		'password' => $passport['passport']
	);
	include_once(S_ROOT.'./source/function_space.php');	//清理在线session	insertsession($setarr);
	ssetcookie('auth', authcode("$setarr[password]\t$setarr[uid]", 'ENCODE'), 60*60*24*7);
	if(empty($_POST['refer'])) {
		$_POST['refer'] = 'space.php?do=home&amp;uids='.$uids.'&amp;sid='.$sid;	}
	$go=$_POST['refer'];
	include template('loginend');
	die;
	}
include template('do_login');?>